@import 'variable';
@import 'spacing';

@mixin background-color($color_value) {
  background-color: $color_value !important;
  border-color: $color_value !important;
}

@mixin text-color($color_value) {
  color: $color_value !important;
  caret-color: $color_value !important;
}

@each $color_name, $color_value in $shades {
  .#{$color_name} {
    @include background-color($color_value);
  }

  .#{$color_name}--text {
    @include text-color($color_value);
  }
}

@each $color_name, $color_color in $colors {
  @each $color_type, $color_value in $color_color {
    @if ($color_type == base) {
      .#{$color_name}--text {
        @include text-color($color_value);
      }
      .#{$color_name} {
        @include background-color($color_value);
      }
    } @else {
      .#{$color_name}--text.text--#{$color_type} {
        @include text-color($color_value);
      }
      .#{$color_name}.#{$color_type} {
        @include background-color($color_value);
      }
    }
  }
}

// 结束颜色配置
.text-center {
  text-align: center;
}
$spacings: () !default;

@each $type, $map in $default-colors {
  @each $key, $val in $map {
    @if $type == bg {
      .#{$key} {
        background-color: $val;
      }
    } @else {
      .text-#{$key} {
        color: $val;
      }
    }
  }
}
@for $line from 0 through 8 {
  .max-line-#{$line} {
    text-overflow: ellipsis;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: $line !important;
    -webkit-box-orient: vertical;
  }
}
.fc {
  display: flex;
  flex-direction: column;
}
.flex {
  display: flex;
}

.price {
  color: map-get(map-get($default-colors, text), price);
  &::before {
    content: '￥';
    font-size: 12px;
    color: map-get(map-get($default-colors, bg), primary);
    padding-right: #{$spacer}px;
  }
  &::after {
    content: '起';
    font-size: 12px;
    color: map-get(map-get($default-colors, bg), primary);
    padding-left: #{$spacer}px;
  }
}

@import 'border';

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC',
    'Helvetica Neue', STHeiti, 'Microsoft Yahei', Tahoma, Simsun, sans-serif;
  font-size: 14px;
  color: $text-secondary;
}
a {
  color: $text-secondary;
  &:hover,
  &:active,
  &:visited {
    color: $text-secondary;
  }
}
.box-shadow {
  box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14),
    0 1px 2px 0 rgba(0, 0, 0, 0.12) !important;
}
.font-weight {
  font-weight: 600;
}

/* 响应式图片 */
.responsive {
  width: 100%;
  height: auto;
  display: block;
}
.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
